package com.example.qingyiapp.ui.activity.fragment.fragment_MenuUI.LoginAdapter;

import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * @author ：created by 申德丰
 * Create Date ：2019/9/16 16:13
 * Package_Name : QingYiApp
 */
public class Login_fragment_adpter extends FragmentPagerAdapter {

    ArrayList<String> strings;
    ArrayList<Fragment> fragments;

    public Login_fragment_adpter(FragmentManager fm, ArrayList<String> strings, ArrayList<Fragment> fragments) {
        super(fm);
        this.strings = strings;
        this.fragments = fragments;
    }


    @Override
    public Fragment getItem(int i) {
        return fragments.get(i);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }


    @Nullable
    @Override
    public CharSequence getPageTitle(int position) {
        return strings.get(position);
    }
}
